﻿<?xml version="1.0" encoding="utf-8" ?>
<xs:schema
		targetNamespace="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0"
		elementFormDefault="qualified"
		xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0"
		xmlns:xs="http://www.w3.org/2001/XMLSchema">

	<xs:annotation>
		<xs:documentation>
			<!-- _locID_text="Description" _locComment="This string is displayed as a Intellisense tooltip. {Placeholder='XmlSiteMapProvider', 'SiteMap'}" -->MvcSiteMapProvider SiteMap File Schema
		</xs:documentation>
	</xs:annotation>

	<xs:complexType name="mvcSiteMapNodeType">
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:element name="mvcSiteMapNode" type="mvcSiteMapNodeType" />
		</xs:choice>
		<xs:attributeGroup ref="urlNodeAttributes" />
		<xs:attributeGroup ref="providerNodeAttributes" />
		<xs:attributeGroup ref="fileNodeAttributes" />
		<xs:attributeGroup ref="frequencyNodeAttributes" />
		<xs:anyAttribute processContents="skip" />
	</xs:complexType>

	<xs:complexType name="mvcSiteMapType">
		<xs:choice minOccurs="0" maxOccurs="1">
			<xs:element name="mvcSiteMapNode" type="mvcSiteMapNodeType"/>
		</xs:choice>
		<xs:attributeGroup ref="siteMapAttributes" />
	</xs:complexType>

	<xs:element name="mvcSiteMap" type="mvcSiteMapType" />

	<xs:attributeGroup name="urlNodeAttributes">
		<xs:attribute name="key" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					(autogenerated) The unique identifier for the node.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="url" type="xs:anyURI" use="optional">
			<xs:annotation>
				<xs:documentation>
					(autogenerated based on routes) The URL represented by the node.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="route" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Can optionally be specified to bind the node URL generation to a specific route.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="title" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>
					The title of the node.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="description" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Description of the node.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="area" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					The MVC area for the sitemap node. If not specified, it will be inherited from a node higher in the hierarchy.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="controller" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					The MVC controller for the sitemap node. Case-sensitive! If not specified, it will be inherited from a node higher in the hierarchy.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="action" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					The MVC action method for the sitemap node. If not specified, it will be inherited from a node higher in the hierarchy.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="roles" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Comma-separated list of roles allowed to access the node and its child nodes.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="resourceKey" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Optional resource key.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="clickable" type="xs:boolean" use="optional">
			<xs:annotation>
				<xs:documentation>
					Is the node clickable or just a grouping node? Default is true.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="inheritedRouteParameters" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Optional. Route parameters that should be inherited from the parent sitemap node. This is not a replacement for the SiteMapPreserveRouteDataAttribute.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="dynamicNodeProvider" type="xs:string" use="optional" >
			<xs:annotation>
				<xs:documentation>
					A class name implementing MvcSiteMapProvider.IDynamicNodeProvider and providing dynamic nodes for the site map.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="urlResolver" type="xs:string" use="optional" >
			<xs:annotation>
				<xs:documentation>
					Class that will be used to generate URLs for sitemap nodes.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="cacheResolvedUrl" type="xs:boolean" use="optional">
			<xs:annotation>
				<xs:documentation>
					Should the resolved URL be cached (true) or resolved on each request (false)? Default is true.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="visibility" type="xs:string" use="optional" >
			<xs:annotation>
				<xs:documentation>
					Example from demo: visibility="SiteMapPathHelper,!*"
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

		<xs:attribute name="visibilityProvider" type="xs:string" use="optional" >
			<xs:annotation>
				<xs:documentation>
					Class that will be used to determine visibility for a sitemap node.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="targetFrame" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Optional target frame for the node link.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

		<xs:attribute name="imageUrl" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Optional image to be shown by supported HtmlHelpers.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

		<xs:attribute name="preservedRouteParameters" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Optional preserved route parameter names (= values that will be used from the current request route).
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

		<xs:attribute name="canonicalUrl" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Optional. The primary URL for what is completely or mostly duplicated content on the current node. 
					The value may be an absolute URL (in the current site or in an external site), a rooted URL starting with '~/', or a relative URL.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="canonicalKey" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Optional. The key value for the node that contains the primary copy of the content for the current node, if it is largely similar.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

		<xs:attribute name="metaRobotsValues" type="metarobots_type" use="optional">
			<xs:annotation>
				<xs:documentation>
					Optional. A space-delimited list of values to apply to the robots meta tag. These will apply to all robots.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

		<xs:attribute name="httpMethod" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					The HTTP method that will be used to check node accessibility. This value is used to select correct controller action if a controller has multiple action accepting different HTTP verbs. Set to * to use HTTP method of current request.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

		<xs:attribute name="order" type="xs:int" use="optional">
			<xs:annotation>
				<xs:documentation>
					Optional. Sort order of this node relative to its sibling nodes (whether they are defined in XML or in code).
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>

	<xs:attributeGroup name="fileNodeAttributes">
		<xs:attribute name="siteMapFile" type="xs:string" use="optional" />
	</xs:attributeGroup>

	<xs:attributeGroup name="providerNodeAttributes">
		<xs:attribute name="provider" type="xs:string" use="optional" />
	</xs:attributeGroup>

	<xs:attributeGroup name="frequencyNodeAttributes">
		<xs:attribute name="lastModifiedDate" type="xs:dateTime" use="optional">
			<xs:annotation>
				<xs:documentation>
					Last modified date for the node. Will be output to sitemaps XML for search engines.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

		<xs:attribute name="changeFrequency" type="changefrequency_type" use="optional" default="Undefined" >
			<xs:annotation>
				<xs:documentation>
					Change frequency for the node. Will be output to sitemaps XML for search engines.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="updatePriority" type="updatepriority_type" default="Undefined" use="optional">
			<xs:annotation>
				<xs:documentation>
					Update priority for the node. Will be output to sitemaps XML for search engines.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>

	<xs:attributeGroup name="siteMapAttributes">
		<!-- Put sitemap attributes here -->
	</xs:attributeGroup>

	<xs:simpleType name="small_boolean_Type">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="false" />
			<xs:enumeration value="true" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="changefrequency_type">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="Undefined" />
			<xs:enumeration value="Always" />
			<xs:enumeration value="Never" />
			<xs:enumeration value="Hourly" />
			<xs:enumeration value="Daily" />
			<xs:enumeration value="Weekly" />
			<xs:enumeration value="Monthly" />
			<xs:enumeration value="Yearly" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="updatepriority_type">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="Undefined" />
			<xs:enumeration value="Automatic" />
			<xs:enumeration value="Low" />
			<xs:enumeration value="Normal" />
			<xs:enumeration value="High" />
			<xs:enumeration value="Critical" />

			<xs:enumeration value="Absolute_000" />
			<xs:enumeration value="Absolute_010" />
			<xs:enumeration value="Absolute_020" />
			<xs:enumeration value="Absolute_030" />
			<xs:enumeration value="Absolute_040" />
			<xs:enumeration value="Absolute_050" />
			<xs:enumeration value="Absolute_060" />
			<xs:enumeration value="Absolute_070" />
			<xs:enumeration value="Absolute_080" />
			<xs:enumeration value="Absolute_090" />
			<xs:enumeration value="Absolute_100" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="metarobots_type">
		<xs:list>
			<xs:simpleType>
				<xs:restriction base="xs:token">
					<xs:enumeration value="index"/>
					<xs:enumeration value="noindex"/>
					<xs:enumeration value="follow"/>
					<xs:enumeration value="nofollow"/>
					<xs:enumeration value="none"/>
					<xs:enumeration value="noarchive"/>
					<xs:enumeration value="nocache"/>
					<xs:enumeration value="nosnippet"/>
					<xs:enumeration value="nopreview"/>
					<xs:enumeration value="noodp"/>
					<xs:enumeration value="noydir"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:list>
	</xs:simpleType>
</xs:schema>